/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.factory.server.bo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 *
 * @author milos
 */
@Entity
@Table(name = "prime")
public class Prime extends AbstractBusinessObject {

    @Column(name = "value", unique=true)
    private Integer value;

    public Prime() {
    }

    public Prime(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (value != null ? value.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Prime)) {
            return false;
        }
        Prime other = (Prime) object;
        if ((this.value == null && other.value != null) || (this.value != null && !this.value.equals(other.value))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return String.valueOf(value);
    }
}
